module DataSource

    logical :: SourcePresent = .false.

    real(8) :: SourceLocation(3)
    integer :: iCellSource
    real(8) :: Amplitude
    real(8) :: PeriodDiv2Pi
    real(8) :: SourceStartTime = 0d0

end module DataSource

module DataBoundarySource

    logical :: BoundSourcePresent = .false.

    integer :: iBoundSurf = 0 ! number of boundary with this source

    real(8) :: coef_af
    real(8) :: coef_bf
    real(8) :: coef_cf
    real(8) :: coef_Omega
    real(8) :: coef_Beta
    
    ! q = af * exp(-bf*(x-cf)^2) * sin(Omega*t) * sin(Beta*y)

contains

    real(8) function CalcBoundSource(r,t)
    implicit none
        real(8),intent(in) :: r(3),t
        
        CalcBoundSource = coef_af * exp(-coef_bf*(r(1)-coef_cf)**2) * &
                          sin(coef_Omega*t) * sin(coef_Beta*r(2))
        
    end function CalcBoundSource

end module DataBoundarySource

